<div class="tableToolbar">
    <div class="coll-md-9" id="addInput">
        <div class="coll-md-2">
            <input type="text" class='search' placeholder="邀请人" ng-model="ctrlScope.itemsearch.username">
        </div>
        <div class="coll-md-2 scalenone" id="search2">
            <div class="coll-md-10">
                <input type="text" class='search' placeholder="用户名" ng-model="ctrlScope.itemsearch.inviteName">
            </div>
        </div>
        <div class="coll-md-5 scalenone"  id="searchdate" datahide>
            <div class="coll-md-5" >
                <p class="input-group">
                    <input type="text" class="search" placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.beginDateTimex" is-open="popup1.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
            <div class="coll-md-5">
                <p class="input-group inline">
                    <input type="text" class="search" placeholder="结束时间" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="ctrlScope.itemsearch.endDateTimex" is-open="popup2.opened" datepicker-options="dateOptions"/>
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							          </span>
                </p>
            </div>
        </div>
        <div class="coll-md-1">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">

            <div class="dropdown-menu-right">
                <input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false">
                <input type="button" class="small-icon more" value="更多">
                <ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
                    <li><a href="javascript:;">日期搜索</a></li>
                    <li><a href="javascript:;">其他条件搜索</a></li>
                </ul>
            </div>

        </div>
    </div>
    <div class="coll-md-1">
        <button class="small-icon btn btn-default pos-right"  ng-click="download()">
            <i class="fa fa-download"></i>
        </button>
    </div>
</div>

<table ui-table="orderParams">
    <thead>
    <tr>


        <th>
            用户名
        </th>
        <th>
            手机号
        </th>
        <th>
            真实姓名
        </th>
        <th>
            注册时间
        </th>
        <th>
            注册来源
        </th>
        <th>
            投资总额（元）
        </th>
        <th>
            邀请人
        </th>
        <th>
            操作
        </th>

    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in orderParams.$rows">
        <td>{{item.inviteUsername}}</td>
        <td>{{item.inviteMobile}}</td>
        <td>{{item.inviteRealname}}</td>
        <td>{{item.inviteAddtime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
        <td>{{item.inviteReferer}}</td>
        <td>{{item.inviteInvestAmount}}</td>
        <td>{{item.username}}</td>
        <td title="操作">
            <a ng-click="openViwModal(item.inviteId)">查看投资详情</a>
            <a ng-click="openEditModal(item.inviteId)">修改邀请人</a>
        </td>

    </tr>
    </tbody>
</table>

<modal title="被邀请人投资详情" visible="viewItemModal" >
    <form class="form-horizontal" role="form">
        <button class="small-icon btn btn-default pos-right" style='margin-right:8px;' ng-click="inviteDownload()">
            <i class="fa fa-download" ></i>
        </button>
        <table ui-table="orderParams1">
            <thead>
            <tr>
                <th>
                    手机号
                </th>
                <th>
                    投资状态
                </th>
                <th>
                    投资金额(元)
                </th>
                <th>
                    投资时间
                </th>
                <th>
                    投资项目
                </th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="item in orderParams1.$rows">
                <td>{{item.mobile}}</td>
                <td>投资成功
                    <!--{{item.investStatus | investStatus}}-->
                </td>
                <td>{{item.investAmount}}</td>
                <td>{{item.addtime | date:'y-MM-dd HH:mm:ss'}}</td>
                <td>{{item.itemName}}</td>
            </tr>
            </tbody>
        </table>
    </form>
</modal>
<modal title="修改" visible="viewEditModal" >
    <form class="form-horizontal" role="form" name="myForm" ng-submit="submitForm(myForm.$valid)" novalidate>


        <div class="row">
            <div class="col-md-3">
                <label class="control-label col-md-12">邀请人</label>
            </div>
            <div class="col-md-6">
                <div class="form-group">

                    <div class="col-md-8">
                        <select class="form-control" required ui-select2="selectOptions" ng-model="list.userId">
                            <option value="" disabled selected hidden>请选择</option>
                            <option ng-repeat="item in username" value="{{item.id}}">{{item.realname}}  {{item.mobile}}</option>
                        </select>
                    </div>
                    <div class="col-md-4">

                    </div>
                </div>
            </div>
        </div>
        <div class="row" >
            <div class="col-md-3">
                <label class="control-label col-md-12">短信验证码</label>
            </div>
            <div class="col-md-6">
                <div class="form-group">

                    <div class="col-md-8">
                        <input type="text" class="form-control" ng-model="list.inputRandomCode" placeholder="请填写验证码"　required>
                    </div>
                    <div class="col-md-4">
                        <input type="button" class="bttn" value="{{Verification.getCodeTest}} {{Verification.time}}" ng-click="getCode()" ng-disabled="Verification.isTimeOut" ng-class="{true:'inputDisabled',false:''}[Verification.isTimeOut]">
                    </div>
                </div>
            </div>

        </div>
        <div class="buttonArea col-md-12">
            <button type="submit" class="btn blue"  ng-disabled="myForm.$invalid" >确定</button>
        </div>

    </form>
</modal>